#pragma once

#include "../im.h"
#include "IMGroup.h"

class IMGroupManager
{
private:
    static IMGroupManager *instance_;
    std::map<groupid_t, IMGroupPtr> groups_;

public:
    static IMGroupManager *getInstance()
    {
        if (instance_ == nullptr)
        {
            instance_ = new IMGroupManager();
        }
        return instance_;
    }

    void addGroup(const std::shared_ptr<IMGroup> &group);
    // 解散群组
    void removeGroup(const std::shared_ptr<IMGroup> &group);
};